###################################################################
# Author: Mu yanru
# Date  : 2019.2
# Email : muyanru345@163.com
###################################################################

# Import future modules
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# Import third-party modules
from PySide2.QtWidgets import QHBoxLayout
from Qt import QtWidgets
from dayu_widgets.field_mixin import MFieldMixin
from dayu_widgets import MToolButton

class GraphToolBar(QtWidgets.QWidget, MFieldMixin):
    def __init__(self, parent=None):
        super(GraphToolBar, self).__init__(parent)
        self.setWindowTitle("Examples for MLabel")
        self._init_ui()

    def _init_ui(self):
        run_btn = MToolButton().svg("close_line.svg").icon_only()
        pause_btn = MToolButton().svg("close_line.svg").icon_only()
        stop_btn = MToolButton().svg("close_line.svg").icon_only()
        preview_btn = MToolButton().svg("close_line.svg").icon_only()
        debug_btn = MToolButton().svg("close_line.svg").icon_only()

        main_lay = QHBoxLayout()
        main_lay.addWidget(run_btn)
        main_lay.addWidget(pause_btn)
        main_lay.addWidget(stop_btn)
        main_lay.addWidget(preview_btn)
        main_lay.addWidget(debug_btn)
        main_lay.addStretch()
        self.setLayout(main_lay)
